package com.yc.hrd.core;

/**
 * 板块
 */
public class Item {

	private int x, y;
	private int num;
	private int width, height;
	
	public Item(int x, int y, int num, int width, int height) {
		super();
		this.x = x;
		this.y = y;
		this.num = num;
		this.width = width;
		this.height = height;
	}
	
	/**
	 * 移动图片的函数
	 * @param x  0~1
	 * @param y  0~1
	 * 
	 * 左移: x => -1, y => 0
	 * 右移: x => +1, y => 0
	 * 上移: x =>  0, y => -1
	 * 下移: x =>  0, y => +1
	 */
	public void move( int x, int y ) {
		this.x += x;
		this.y += y;
	}

	// 生成取值方法
	public int getX() {
		return x;
	}

	public int getY() {
		return y;
	}

	public int getNum() {
		return num;
	}

	public int getWidth() {
		return width;
	}

	public int getHeight() {
		return height;
	}

}
